<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html">

	<h:head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Expires" content="0" />

		<f:loadBundle basename="constantes" var="const" />

		<h:outputStylesheet library="design/css" name="default.css" />
		<h:outputStylesheet library="design/css" name="css.css" />

		<h:outputScript library="design/js" name="calendar_traducao.js" />
		<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />

		<title><h:outputText value="#{const.versao}" /></title>
		<ui:insert name="head"></ui:insert>

		<style type="text/css">
.ui-layout-north {
	z-index: 20 !important;
	overflow: visible !important;;
}

.ui-layout-north .ui-layout-unit-content {
	overflow: visible !important;
}
</style>

	</h:head>

	<h:body>
		<h:form id="formTimeSession" prependId="false">
			<p:idleMonitor timeout="#{const.timeSessionTempo}">
				<p:ajax event="idle" listener="#{principalBean.loginTimeOut}" />
			</p:idleMonitor>
		</h:form>

		<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();" />
		<p:dialog modal="true" widgetVar="statusDialog" draggable="false" closable="false" resizable="false">
			<h:graphicImage library="design/imagem" name="ajaxloading.gif" />
		</p:dialog>

		<p:layout fullPage="true">
			<p:layoutUnit id="top" position="north" size="80" closable="false" collapsed="false">
				<h:form prependId="false">
					<table style="width: 100%">
						<tr>
							<td width="33%" align="left" style="vertical-align: middle;"><p:commandLink title="SIPE"
									style="font-size: 8px;" ajax="false" action="${principalBean.principalTemplate}" immediate="true">
									<h:graphicImage library="design/imagem" name="logo.png" style="font-size:24 !important;margin: 10 !important;" />
								</p:commandLink></td>
							<td width="33%" align="center" style="vertical-align: middle; color: #A9303D; font-weight: bold;"></td>
							<td width="33%" align="right" style="vertical-align: middle;">
								<div style="float: right; align: right;">
									<h:outputText style="align:right;font-size:14;margin:10;" value="Bem Vindo: #{login.model.nome}" />
									<p:commandLink title="Sair" value="Sair" style="margin: 10px; font-weight: bold; font-size: 14px;"
										action="${sair.logout}" immediate="true" />
								</div>
							</td>
						</tr>
					</table>
				</h:form>
			</p:layoutUnit>
			<p:layoutUnit position="west" resizable="false" size="200" header="Menu" collapsible="true">
				<p:accordionPanel multiple="false" cache="true" activeIndex="0">
					<p:tab title="Cadastro">
						<p:menu id="menuCadastro" type="plain" model="#{menuBean.cadastro}" style="border:0px !important;" />
					</p:tab>

				</p:accordionPanel>
			</p:layoutUnit>

			<p:layoutUnit position="center">
				<p:growl id="msgs" autoUpdate="true" showDetail="true" globalOnly="true" life="#{const.growlTime}" />
				<ui:insert name="body" />
			</p:layoutUnit>

		</p:layout>
	</h:body>
</f:view>

</html>